﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin.master" AutoEventWireup="true" CodeFile="Quanly_quanhuyen.aspx.cs" Inherits="Admin_Quanhuyen_Quanly_quanhuyen" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <p>
    <asp:Label ID="Label1" runat="server" BackColor="White" Font-Bold="True" 
        Font-Size="X-Large" ForeColor="#FF3300" Text="Quản Lý Quận Huyện"></asp:Label>
        <br />
    </p>
    <p>
        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
            AutoGenerateColumns="False" BackColor="White" BorderColor="#999999" 
            BorderStyle="None" BorderWidth="1px" CellPadding="3" DataKeyNames="Id_qh" 
            DataSourceID="LinqDataSource1" GridLines="Vertical">
            <AlternatingRowStyle BackColor="#DCDCDC" />
            <Columns>
                <asp:CommandField HeaderText="Lựa chọn" ShowDeleteButton="True" 
                    ShowEditButton="True" />
                <asp:BoundField DataField="Id_qh" HeaderText="Mã" ReadOnly="True" 
                    SortExpression="Id_qh" />
                <asp:BoundField DataField="Ten_qh" HeaderText="Tên" SortExpression="Ten_qh" />
                <asp:TemplateField HeaderText="Thành phố" SortExpression="thanhpho.Ten_tp">
                <ItemTemplate><%# Eval("thanhpho.Ten_tp") %></ItemTemplate>
                <EditItemTemplate>
                  <asp:DropDownList ID="thanhpho" 
                    DataSourceID="LinqDataSource2"
                     DataValueField="Id_tp"
                    DataTextField="Ten_tp" 
                    SelectedValue='<%#Bind("Id_tp") %>' runat="server"/>
                </EditItemTemplate>
                
                  
                 
                </asp:TemplateField>
            </Columns>
            <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
            <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
            <RowStyle BackColor="#EEEEEE" ForeColor="Black" />
            <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
            <SortedAscendingCellStyle BackColor="#F1F1F1" />
            <SortedAscendingHeaderStyle BackColor="#0000A9" />
            <SortedDescendingCellStyle BackColor="#CAC9C9" />
            <SortedDescendingHeaderStyle BackColor="#000065" />
        </asp:GridView>
        <asp:LinqDataSource ID="LinqDataSource1" runat="server" 
            ContextTypeName="DLL.luuliDataContext" EnableDelete="True" EnableInsert="True" 
            EnableUpdate="True" EntityTypeName="" TableName="quanhuyens">
        </asp:LinqDataSource>
    </p>
    <p>
        <asp:LinqDataSource ID="LinqDataSource2" runat="server" 
            ContextTypeName="DLL.luuliDataContext" EntityTypeName="" TableName="thanhphos">
        </asp:LinqDataSource>
    </p>
</asp:Content>

